package com.choudou5.solr.dataimport.config;

/**
 * 数据范围
 *
 * @author choudou5
 * @create 2017-08-下午 8:52
 **/
public class DIDataRange {

    private long fullTotal;
    private long begin;
    private long end;

    public DIDataRange(long fullTotal, long begin, long end) {
        this.fullTotal = fullTotal;
        this.begin = begin;
        this.end = end;
    }

    public long getBegin() {
        return begin;
    }

    public DIDataRange setBegin(long begin) {
        this.begin = begin;
        return this;
    }

    public long getEnd() {
        return end;
    }

    public DIDataRange setEnd(long end) {
        this.end = end;
        return this;
    }

    public void setFullTotal(long fullTotal) {
        this.fullTotal = fullTotal;
    }

    public long getFullTotal() {
        return fullTotal;
    }

    public long getTotal() {
        return end-begin;
    }


    @Override
    public String toString() {
        return "DIDataRange{fullTotal=" + fullTotal + ", begin=" + begin + ", end=" + end + ", execute="+(end-begin)+"}";
    }
}
